package com.swt.domain;

import javax.persistence.*;
import java.util.Set;

@Entity
public class Club {
    private int clubId;
    private String clubPhone;
    private String clubPassword;
    private String clubCategory;
    private String clubName;
    private String clubLinkman;
    private String clubAddress;
    private String clubStatus;
    private String clubRegdate;
    private String clubImg;
    private String clubRegmonth;
    private Set<Shop> shopSet;


    @Basic
    @Column(name = "club_regmonth")
    public String getClubRegmonth() {
        return clubRegmonth;
    }

    public void setClubRegmonth(String clubRegmonth) {
        this.clubRegmonth = clubRegmonth;
    }

    @Id
    @Column(name = "club_id")
    @GeneratedValue(strategy = GenerationType.AUTO)
    public int getClubId() {
        return clubId;
    }

    public void setClubId(int clubId) {
        this.clubId = clubId;
    }

    @Basic
    @Column(name = "club_phone")
    public String getClubPhone() {
        return clubPhone;
    }

    public void setClubPhone(String clubPhone) {
        this.clubPhone = clubPhone;
    }

    @Basic
    @Column(name = "club_password")
    public String getClubPassword() {
        return clubPassword;
    }

    public void setClubPassword(String clubPassword) {
        this.clubPassword = clubPassword;
    }

    @Basic
    @Column(name = "club_category")
    public String getClubCategory() {
        return clubCategory;
    }

    public void setClubCategory(String clubCategory) {
        this.clubCategory = clubCategory;
    }

    @Basic
    @Column(name = "club_name")
    public String getClubName() {
        return clubName;
    }

    public void setClubName(String clubName) {
        this.clubName = clubName;
    }

    @Basic
    @Column(name = "club_linkman")
    public String getClubLinkman() {
        return clubLinkman;
    }

    public void setClubLinkman(String clubLinkman) {
        this.clubLinkman = clubLinkman;
    }

    @Basic
    @Column(name = "club_address")
    public String getClubAddress() {
        return clubAddress;
    }

    public void setClubAddress(String clubAddress) {
        this.clubAddress = clubAddress;
    }

    @Basic
    @Column(name = "club_status")
    public String getClubStatus() {
        return clubStatus;
    }

    public void setClubStatus(String clubStatus) {
        this.clubStatus = clubStatus;
    }


    @Basic
    @Column(name = "club_regdate")
    public String getClubRegdate() {
        return clubRegdate;
    }

    public void setClubRegdate(String clubRegdate) {
        this.clubRegdate = clubRegdate;
    }


    @Basic
    @Column(name = "club_img")
    public String getClubImg() {
        return clubImg;
    }

    public void setClubImg(String clubImg) {
        this.clubImg = clubImg;
    }

    /*维护对应分店信息*/
    @OneToMany(targetEntity = Shop.class)
    @JoinColumn(name = "clubClubId",referencedColumnName = "club_id")
    public Set<Shop> getShopSet() {
        return shopSet;
    }

    public void setShopSet(Set<Shop> shopSet) {
        this.shopSet = shopSet;
    }

    @Override
    public String toString() {
        return "Club{" +
                "clubId=" + clubId +
                ", clubPhone='" + clubPhone + '\'' +
                ", clubPassword='" + clubPassword + '\'' +
                ", clubCategory='" + clubCategory + '\'' +
                ", clubName='" + clubName + '\'' +
                ", clubLinkman='" + clubLinkman + '\'' +
                ", clubAddress='" + clubAddress + '\'' +
                ", clubStatus='" + clubStatus + '\'' +
                ", clubRegdate='" + clubRegdate + '\'' +
                ", clubImg='" + clubImg + '\'' +
                ", clubRegmonth='" + clubRegmonth + '\'' +
                ", shopSet=" + shopSet +
                '}';
    }
}
